<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="pragram" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache, must-revalidate"/>
    <meta http-equiv="expires" content="0"/>
    <meta name="renderer" content="webkit"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>方便大师充值记录</title>
    <link rel="stylesheet" href="/assets/css/lib/pagination.css">
    <link rel="stylesheet" href="/assets/css/lib/bootstrap.min.css">
    <link rel="stylesheet" href="/assets/css/common.css">
    <link rel="stylesheet" href="/assets/css/device.css">
</head>
<body>
<div id="cms">
    <jsp:include page="title_bar.jsp"/>
    <jsp:include page="tab_bar.jsp"/>
    <div class="cms-content">
        <div class="current-place">
            <div class="place-title">当前位置:</div>
            <div class="place-val">首页/设备管理</div>
        </div>
        <div class="seek-box">
            <div class="common-title">
                <div class="common-left-line"></div>
                <div class="common-text">条件查询</div>
            </div>
            <div class="seek-content">

                <div class="seek-group">

                    <div class="seek-unit">
                        <span class="seek-unit-left">设备唯一编码</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control client-name" id="sbwybm">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <div class="seek-unit-left seek-btn"  >
                            查询
                        </div>
                        <div class="seek-unit-right seek-clear"  >
                            清空条件
                        </div>
                        <div class="seek-unit-left add-btn" onclick="showadd()"  >
                            新增
                        </div>

                    </div>
                </div>

            </div>
        </div>
        <div class="table-box">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>
                        <div>设备唯一编码</div>
                    </th>
                    <th>
                        <div>设备名称</div>
                    </th>
                    <th>
                        <div style="width:60px;" style="text-align:center;">二维码</div>
                    </th>
                    <th>
                        <div>设备价格</div>
                    </th>
                    <th>
                        <div>设备状态</div>
                    </th>
                    <th>
                        <div>设备投放地址</div>
                    </th>

                    <th>
                        <div>设备投放日期</div>
                    </th>
                    <th>
                        <div>设备维修日期</div>
                    </th>
                       <th>
                        <div>备注</div>
                    </th>
                </tr>
                </thead>
                <tbody id="tbody1">

                </tbody>
                <script id="list1" type="text/html">
                    <!for(k in result){
                    var v=result[k];
                    !>
                    <tr>
                        <td class="deviceNum"><!=v.id==deviceNum?'':v.deviceNum!></td>
                        <td class="deviceName"><!=v.deviceName==null?'':v.deviceName!></td>
                        <td class="deviceUrl"><div onclick="onurl(this)"   class="seek-unit-right seek-ewm ;  "  style="text-align:center;" >
                            点击获取
                         </div></td>
                        <td class="devicePrice"><!=v.devicePrice==null?'':v.devicePrice!></td>
                        <td class="deviceStatus"><!=v.deviceStatus==null?'':(v.deviceStatus==0?'未投放':(v.deviceStatus==1?'正常':'维修'))!></td>
                        <td class="deviceAdd"><!=v.deviceAdd==null?'':v.deviceAdd!></td>
                        <td class="deviceDate"><!= getFormatDate(v.deviceDate)!></td>
                        <td class="deviceUpdate"><!= getFormatDate(v.deviceUpdate)!></td>
                        <td class="remark"><!=v.remark==null?'':v.remark!></td>
                        <td class="operate">
                            <!if(role==0){!>
                            <div class="ud-btn modify-btn"
                                 data-value="<!=v.deviceId!>"
                                 id-value="<!=v.deviceId!>" onclick="showedit(this)"
                            >编辑
                            </div>
                            <!}!>
                        </td>
                    </tr>
                    <!}!>
                </script>

            </table>
            <div class="table-bottom clearfix">
                <div id="Pagination" class="pagination"><!-- 这里显示分页--></div>
                <span id="currentCount"></span>
            </div>
        </div>

    </div>
</div>


<div class="cms-modal-lg" id='add-device'>
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">管理设备</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        设备唯一编码
                        <input type="text" name="" value="" class="padding-span form-control" id="deviceNum">
                    </div>
                    <div class="state-right">
                        设备名称
                        <input type="text" name="" value=""   class="padding-span form-control"  id="deviceName">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        设备价格
                        <input type="text" name="" value="" class="padding-span form-control" id="devicePrice">
                    </div>
                    <div class="state-right">
                        设备投放地址
                        <input type="text" name="" value="" class="padding-span form-control"   id="deviceAdd">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        设备投放日期
                        <input type="text" name="" class="Wdate "  value="" class="padding-span form-control" id="deviceDate">
                    </div>
                    <div class="state-right">
                        设备维修日期
                        <input type="text"  class="Wdate "   name="" value="" class="padding-span form-control"   id="deviceUpdate">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        设备状态
                        <select class="selectcj form-control" id="deviceStatus">
                            <option value="0">未投放</option>
                            <option value="1">正常</option>
                            <option value="1">维修</option>
                        </select>
                    </div>
                </div>
            </div>

                 <div class="two-stage">
                <div class="state-left">
                    <span>备注</span>
                </div>
            </div>
            <textarea placeholder="请输入备注" class="common-remark" id="remark"></textarea>
            <div class="limit200">限200字</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm edit-confirm" onclick="add()">确定</button>
            <button type="button" class="cms-cancel edit-cancel" onclick="hideDialog()">取消</button>
        </div>
    </div>
</div>
<div class="cms-modal-lg" id='edit-device'>
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">管理设备</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div style="display: none">
                        ID
                        <input type="text" name="" value="" class="padding-span form-control" id="deviceId_edit">
                    </div>
                    <div class="state-left">
                        设备唯一编码
                        <input type="text" name="" value="" class="padding-span form-control" id="deviceNum_edit">
                    </div>
                    <div class="state-right">
                        设备名称
                        <input type="text" name="" value=""  class="padding-span form-control"  id="deviceName_edit">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        设备价格
                        <input type="text" name="" value="" class="padding-span form-control" id="devicePrice_edit">
                    </div>
                    <div class="state-right">
                        设备投放地址
                        <input type="text" name="" value="" class="padding-span form-control" id="deviceAdd_edit">

                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        设备投放日期
                        <input type="text" name=""  class="Wdate "  value="" class="padding-span form-control" id="deviceDate_edit">
                    </div>
                    <div class="state-right">
                        设备维修日期
                        <input type="text" name=""  class="Wdate "  value=""   id="deviceUpdate_edit">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        设备状态
                        <select class="selectcj form-control" id="deviceStatus_edit">
                            <option value="0">未投放</option>
                            <option value="1">正常</option>
                            <option value="1">维修</option>
                        </select>
                    </div>
                </div>
            </div>

                 <div class="two-stage">
                <div class="state-left">
                    <span>备注</span>
                </div>
            </div>
            <textarea placeholder="请输入备注" class="common-remark" id="remark_edit"></textarea>
            <div class="limit200">限200字</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm edit-confirm" onclick="edit()">确定</button>
            <button type="button" class="cms-cancel edit-cancel" onclick="hideDialog()">取消</button>
        </div>
    </div>
</div>

</body>
<script type="text/javascript" src="/assets/js/lib/jquery-1.12.3.js"></script>
<script type="text/javascript" src="/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/js/lib/modal.js"></script>
<script type="text/javascript" src="/assets/js/lib/cmsmodal.js"></script>

<script type="text/javascript" src="/assets/js/lib/distpicker.data.js"></script>
<script type="text/javascript" src="/assets/js/lib/distpicker.js"></script>
<script type="text/javascript" src="/assets/js/lib/jquery.pagination.js"></script>

<script type="text/javascript" src="/assets/js/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/assets/js/common.js"></script>
<script type="text/javascript" src="/assets/js/communal/template.js"></script>
<script type="text/javascript" src="/assets/js/deviceManage.js"></script>
</html>